package com.jsb.laundry.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 帖子表
 * @TableName jsb_posts
 */
@TableName(value ="jsb_posts")
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "帖子信息对象")
public class JsbPosts implements Serializable {
    @ApiModelProperty(value = "帖子id", dataType = "int")
    @TableId(type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "帖子标题", dataType = "string")
    private String title;

    @ApiModelProperty(value = "帖子内容", dataType = "string")
    private String content;

    @ApiModelProperty(value = "图片列表 json", dataType = "string")
    private String images;

    @ApiModelProperty(value = "标签列表 json", dataType = "string")
    private String tags;

    @ApiModelProperty(value = "点赞数", dataType = "int")
    private Integer likes;

    @ApiModelProperty(value = "收藏数", dataType = "int")
    private Integer favorites;

    @ApiModelProperty(value = "评论数", dataType = "int")
    private Integer comments;

    @ApiModelProperty(value = "创建用户id", dataType = "string")
    private String userId;

    @ApiModelProperty(value = "审核状态：0 待审核；1 审核通过；2 审核拒绝", dataType = "int")
    private Integer isApproved;

    @ApiModelProperty(value = "是否删除：0 未删除；1 已删除", dataType = "int")
    private Integer isDel;

    @ApiModelProperty(value = "创建时间", dataType = "data")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdAt;

    @ApiModelProperty(value = "更新时间", dataType = "data")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}